package controller;

import com.shop.entity.Result;
import com.shop.pojo.User;
import com.shop.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("/user")
public class UserController {

    @Autowired
    private UserService userService;

    /**	1.查询所有用户*/
    @RequestMapping("/findAllUser.do")
    @ResponseBody
    public List<User> findAllUser() {
        return null;
    }

    /**2.添加新的用户*/
    @RequestMapping("/addUser.do")
    @ResponseBody
    public Result addUser(User user) {
        return null;
    }

    /**3.根据id查询用户信息*/
    @RequestMapping("/getUserById.do")
    @ResponseBody
    public User getUserById(String uid) { return null;
    }
    /**4.删除用户*/
    @RequestMapping("/deleteUser.do")
    @ResponseBody
    public Result deleteUser(String uid) {
        return null;
    }

    /**5.修改用户*/
    @RequestMapping("/updateUser.do")
    @ResponseBody
    public Result updateUser(User user) {
        return null;
    }
}
